<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
*/
class modYmHelper {

    function addYm(&$params) {
        $n = $params->get('nick_name');
        $u = $params->get('name');
        $des = $params->get('description');
        $img = $params->get('image');

        $arr_nick = explode("\n", $n);
        $arr_name = explode("\n", $u);
        $arr_des  = explode("\n", $des);
        $str = null;
        for($i=0; $i<count($arr_nick); $i++) {

            $str .= '<a href="ymsgr:sendim?'.$arr_nick[$i].'" border="0"><img src="http://opi.yahoo.com/online?u='.$arr_nick[$i].'&t='.$img.'"></a><br/>';
            $str .= $arr_name[$i].' - '.$arr_des[$i].'<br/>';
        }
        return $str;
    }
}